#ifndef TOAST_H
#define TOAST_H

#include <QLabel>
#include <QTimer>
#include <QVBoxLayout>
#include <QWidget>

class Toast : public QLabel {
    Q_OBJECT
public:
    explicit Toast(QWidget* parent = nullptr);

    // 显示消息，duration 为显示毫秒数
    static void showMessage(QWidget* parent, const QString& message, int duration = 1000);

private:
    QTimer* m_timer;
};

#endif // TOAST_H
